package com.bible.fire.ui;

import android.app.ProgressDialog;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class SimpleProgressDialog extends ProgressDialog {
	
	
	public SimpleProgressDialog(Context context){
		super(context);
	}
	
	public void show(){
		super.show();
		setDialogText(this.getWindow().getDecorView());
	}
	
	private void setDialogText(View v) {
        if (v instanceof ViewGroup) {
            ViewGroup parent = (ViewGroup) v;
            int count = parent.getChildCount();
            for (int i = 0; i < count; i++) {
                View child = parent.getChildAt(i);
                setDialogText(child);
            }
        } else if (v instanceof TextView) {
            ((TextView) v).setTextSize(22); //是textview，设置字号
        }
   }

}
